package com.xuexiang.yoyo.adapter;

import androidx.annotation.NonNull;

import com.xuexiang.yoyo.R;
import com.xuexiang.yoyo.adapter.entity.ReadData;
import com.xuexiang.xui.adapter.recyclerview.BaseRecyclerAdapter;
import com.xuexiang.xui.adapter.recyclerview.RecyclerViewHolder;

/**
 * 基于simple_list_item_2简单的适配器
 *
 * @author XUE
 * @since 2019/4/1 11:04
 */
public class ReadDataRecyclerAdapter extends BaseRecyclerAdapter<ReadData> {

    public ReadDataRecyclerAdapter() {
    }

    @Override
    protected void bindData(@NonNull RecyclerViewHolder holder, int position, ReadData item) {
        holder.text(R.id.name, item.getDataItemName());
        holder.text(R.id.value, item.getValue());
        holder.text(R.id.ln, item.getLn());
    }

    @Override
    protected int getItemLayoutId(int viewType) {
        return R.layout.simple_list_item_read_data;
    }

}
